  <!-- 个人中心-个人资料 -->
  <div class="personal-data">
    <div class="card-head">
      <div class="card-head-img">
        <nz-avatar nzIcon="user" [nzSrc]="currentUser.Avatar" class="avatar-img"></nz-avatar>
        <div class="nickname">{{currentUser.NickName}}</div>
        <nz-upload
          [nzAccept]="'.jpg, .jpeg, .png'"
          [nzShowUploadList]="false"
          [nzBeforeUpload]="beforeUpload"
          >
          <button class="btn-normol upload-btn">
            更换头像
          </button>
        </nz-upload>
      </div>
      <div class="card-head-title">
        <div>
          <p>会员积分：{{currentUser.Integral}}</p>
          <p>信用分：{{currentUser.Credit}}</p>
        </div>
        <button class="btn-normol certificate-btn" (click)="showModalMiddle()" [disabled]="Authentication">
          {{ Authentication ? '已认证' : '实名认证' }}
        </button>
      </div>
    </div>
    <nz-modal
        [(nzVisible)]="isVisibleMiddle"
        nzTitle="身份认证"
        nzCentered
        (nzOnCancel)="handleCancelMiddle()"
        (nzOnOk)="handleOkMiddle()"
        (nzOnClose)="handleClose()"
      >
        <ng-container *nzModalContent>
          <form nz-form>
            <nz-form-item>
              <nz-form-label nzSpan="4" nzRequired>客户姓名</nz-form-label>
              <nz-form-control nzSpan="14">
                <input nz-input type="text" [(ngModel)]="name" name="userName" required>
              </nz-form-control>
            </nz-form-item>
            <nz-form-item>
              <nz-form-label nzSpan="4" nzRequired>身份证号</nz-form-label>
              <nz-form-control nzSpan="14">
                <input nz-input type="text" [(ngModel)]="idCard" name="idcard" required>
              </nz-form-control>
            </nz-form-item>
          </form>
        </ng-container>
      </nz-modal>
    <div class="card-content">
      <form nz-form>
        <div nz-row>
          <div nz-col nzSpan="12">
            <nz-form-item>
              <nz-form-label nzRequired>昵称</nz-form-label>
              <nz-form-control nzHasFeedback [nzSpan]="14" nzErrorTip="昵称必须填写">
                <input nz-input [(ngModel)]="currentUser.NickName" name="nickname" required [nzBorderless]="borderDisplay" [disabled]="borderDisplay" type="text"/>
              </nz-form-control>
            </nz-form-item>
          </div>
          <div nz-col nzSpan="10" nzOffset="2">
            <nz-form-item>
              <nz-form-label>出生日期</nz-form-label>
              <nz-form-control [nzSpan]="14">
                <nz-date-picker [(ngModel)]="currentUser.Birthday" *ngIf="!borderDisplay"></nz-date-picker>
                <input nz-input type="text" [value]="birthday" name="birthday" [nzBorderless]="true" [disabled]="true" *ngIf="borderDisplay"/>
              </nz-form-control>
            </nz-form-item>
          </div>
        </div>
        <div nz-row>
          <div nz-col nzSpan="12">
            <nz-form-item>
              <nz-form-label>姓名</nz-form-label>
              <nz-form-control nzHasFeedback [nzSpan]="14" nzErrorTip="请输入合法的身份证号">
                <input nz-input type="text" [value]="currentUser.Name" name="name" [nzBorderless]="true" [disabled]="true"/>
              </nz-form-control>
            </nz-form-item>
          </div>
          <div nz-col nzSpan="10" nzOffset="2">
            <nz-form-item>
              <nz-form-label>现住地址</nz-form-label>
              <nz-form-control [nzSpan]="14">
                <input nz-input type="text" [(ngModel)]="currentUser.Address" name="address" [nzBorderless]="borderDisplay" [disabled]="borderDisplay"/>
              </nz-form-control>
            </nz-form-item>
          </div>
        </div>
        <div nz-row>
          <div nz-col nzSpan="12">
            <nz-form-item>
              <nz-form-label>电话</nz-form-label>
              <nz-form-control nzHasFeedback [nzSpan]="14">
                <input nz-input type="text" [value]="currentUser.Phone" name="phone" [nzBorderless]="true" [disabled]="true"/>
              </nz-form-control>
            </nz-form-item>
          </div>
          <div nz-col nzSpan="10" nzOffset="2">
            <nz-form-item>
              <nz-form-label>是否认证</nz-form-label>
              <nz-form-control [nzSpan]="14">
                <input nz-input type="text" [value]="currentUser.Authentication !== 1 ? '是' : '否'" name="authentication" [nzBorderless]="true" [disabled]="true"/>
              </nz-form-control>
            </nz-form-item>
          </div>
        </div>
        <div nz-row>
          <div nz-col nzSpan="12">
            <nz-form-item>
              <nz-form-label>邮箱</nz-form-label>
              <nz-form-control nzHasFeedback [nzSpan]="14" nzErrorTip="请输入正确的邮箱">
                <input nz-input type="email" [(ngModel)]="currentUser.Email" name="email" [nzBorderless]="borderDisplay" [disabled]="borderDisplay"/>
              </nz-form-control>
            </nz-form-item>
          </div>
          <div nz-col nzSpan="10" nzOffset="2">
            <nz-form-item>
              <nz-form-label>会员编号</nz-form-label>
              <nz-form-control [nzSpan]="14">
                <input nz-input type="text" [value]="currentUser.VipId" name="vipId" [nzBorderless]="true" [disabled]="true"/>
              </nz-form-control>
            </nz-form-item>
          </div>
        </div>
        <div nz-row>
          <div nz-col nzSpan="12">
            <nz-form-item>
              <nz-form-label>身份证</nz-form-label>
              <nz-form-control nzHasFeedback [nzSpan]="14" nzErrorTip="请输入合法的身份证号">
                <input nz-input type="text" [value]="idDesensitization()" name="idCard" [nzBorderless]="true" [disabled]="true"/>
              </nz-form-control>
            </nz-form-item>
          </div>
          <div nz-col nzSpan="10" nzOffset="2">
            <nz-form-item>
              <nz-form-control>
                <button class="btn-normol btn-update" (click)="prepareUpdate()" *ngIf="borderDisplay">修改</button>
                <button class="btn-normol btn-cancel" (click)="cancelUpdate()" *ngIf="!borderDisplay">取消</button>
              </nz-form-control>
              <nz-form-control [nzOffset]="5">
                <button class="btn-normol btn-complete" (click)="updateUserData()" [disabled]="borderDisplay">完成</button>
              </nz-form-control>
            </nz-form-item>
          </div>
        </div>
        <div nz-row>
          <div nz-col nzSpan="12">
            <nz-form-item>
              <nz-form-label>性别</nz-form-label>
              <nz-form-control [nzSpan]="14">
                <nz-radio-group [(ngModel)]="currentUser.Sex" *ngIf="!borderDisplay">
                  <label nz-radio [nzValue]="1" name="gender">男</label>
                  <label nz-radio [nzValue]="2" name="gender">女</label>
                </nz-radio-group>
                <input nz-input type="text" [value]="currentUser.Sex===1?'男':'女'" name="sex" [nzBorderless]="true" [disabled]="true" *ngIf="borderDisplay"/>
              </nz-form-control>
            </nz-form-item>
          </div>
        </div>
      </form>
    </div>
  </div>






